const role = (data) => (data != null && data != '') || data == 0;
export const formData = [
    {
        label: '角色名称',
        key: 'roleName',
        type: 'input',
        value: null,
        role: role,
        required:true,
    },
    {
        label: '角色代码',
        key: 'roleKey',
        type: 'input',
        value: null,
        required:true,
        role: role
    },
    {
        label: '角色排序值',
        key: 'roleSort',
        type: 'inputNumber',
        value: 0,
        required: true,
        role: role
    },
    {
        label: '数据范围',
        key: 'dataScope',
        type: 'select',
        options: [
            { label: '全部数据权限', value: 1 },
            { label: '自定数据权限', value: 2 },
            { label: '本部门数据权限', value: 3 },
            { label: '本部门及以下数据权限', value: 4 },
        ], 
        value: 1,
        required: true,
        role: role
    },
    {
        label: '角色备注',
        key: 'remark',
        type: 'input',
        value: null,
        required:false,
        role: role
    },

]